@echo off
    
rem *** SQL Server Settings ***
set SqlUser=codelab
set SqlPassword=codelab
set SqlServer=.
set SqlDatabase=Budgeteer
set SqlCmdDir=%ProgramFiles%\Microsoft SQL Server\100\Tools\Binn

rem *** Paths ***
set SolutionDir=C:\projects\Budgeteer
set TempDir=C:\Temp

rem *** Environment ***
set ConnectionString=server=(local);database=Budgeteer;Trusted_Connection=true
set TestDataFolder=C:\projects\Budgeteer\Test.UnitTests\Budgeteer.TestData
set ClientDataFolder=C:\projects\Budgeteer\Budgeteer.WebSite\Data\Budgeteer.TestData
set DevMode=true
set StartDate=9/1/2004

rem *** Machine Definitions ***

  rem *** Continuous integration ***

  goto devbox
 
goto notfound

rem *** Continuous integration ***

:CruiseControl

  goto writeconfig

rem *** Individual developer machines ***

:devbox

  goto writeconfig

:notfound
  echo Environment settings not found for computer %COMPUTERNAME%, edit
  echo EnvironmentSetup.bat to add your settings.
  exit /B 1

:writeconfig
  
DevLibraries\ConfigFileMaker.exe Configuration\Budgeteer.WebSite.web.config.template Configuration\Budgeteer.WebSite.web.config
if ERRORLEVEL 1 goto configerror
copy "Configuration\Budgeteer.WebSite.web.config" "Budgeteer.WebSite\web.config" /y

DevLibraries\ConfigFileMaker.exe Configuration\Budgeteer.TaskRunner.app.config.template Configuration\Budgeteer.TaskRunner.app.config
if ERRORLEVEL 1 goto configerror
copy "Configuration\Budgeteer.TaskRunner.app.config" "Budgeteer.TaskRunner\app.config" /y

DevLibraries\ConfigFileMaker.exe Configuration\Test.UnitTests.app.config.template Configuration\Test.UnitTests.app.config
if ERRORLEVEL 1 goto configerror
copy "Configuration\Test.UnitTests.app.config" "Test.UnitTests\app.config" /y

  goto end

:configerror
echo Configuration file creation failed.
exit /B 1

:end
exit /B 0
